package mlz.a_set.c_treeset;

import java.util.TreeSet;

//默认排序
public class TreeSetDemo02 {
    public static void main(String[] args) {
        TreeSet<User> set = new TreeSet<>();
        set.add(new User("张三",18));
        set.add(new User("李四",20));
        set.add(new User("王五",19));
        set.add(new User("赵六",17));
        set.add(new User("张三",18));
        System.out.println(set);

    }
}
